﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace uam_fps_game.Physics
{
    public class PhysicsSystem
    {
        public static PhysicsSystem Global { get; set; }

        private List<RigidBody> _rigidBodies;

        public PhysicsSystem()
        {
            _rigidBodies = new List<RigidBody>();
        }

        public RigidBody CreateRigidBody()
        {
            RigidBody rb = new RigidBody();
            _rigidBodies.Add(rb);
            return rb;
        }

        public void Update(float dt)
        {
            for (int i = 0; i < _rigidBodies.Count ; i++)
            {
                _rigidBodies[i].Update(dt);
            }
        }
    }
}
